package com.pro.controller;

import com.pro.bean.Rotationimg;
import com.pro.service.RotationimgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * (Rotationimg)表控制层
 *
 * @author 李浩
 * @since 2020-12-15 08:56:59
 */
@RestController
@RequestMapping("rotationimg")
public class RotationimgController {
    /**
     * 服务对象
     */
    @Autowired
    private RotationimgService rotationimgService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public Rotationimg selectOne(Integer id) {
        return this.rotationimgService.queryById(id);
    }

    @GetMapping("all")
    public List<Rotationimg> all(){
        return rotationimgService.all();
    }

}